home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-170 dbase 10 for windows / 1.ima / DOC.PAK / SAMPLES.TXT < prev    next >
Text File  |  1993-07-26  |  9KB  |  257 lines

  1.              Copyright (c) 1991-1993 Borland International, Inc.
  2.                             All Rights Reserved.
  3.  
  4. This document describes the sample program files, which are installed
  5. in the SAMPLES subdirectory.
  6.  
  7. Several programs use Bladerunner's new Open Window syntax, which lets 
  8. you run multiple programs simultaneously. For example, start Contact.prg
  9. by either typing DO CONTACT in the Command Window or double-clicking on 
  10. its icon in the File Viewer.  After Contact's window appears, you can 
  11. start Winapi.prg, again either through the Command Window or the File 
  12. Viewer, and switch freely between the two windows.
  13.  
  14.  
  15. ANIMALS.PRG
  16. -----------
  17.  
  18. Files used: Animals.dbf, Animals.dbt
  19.  
  20. This program shows how Bladerunner's window objects defined on database
  21. fields are related and change as the record pointer changes.  It also
  22. displays Bladerunner's imaging commands.
  23.  
  24. A window is defined with a listbox of image names and the image
  25. corresponding to the currently highlighted name.  The image is stored in
  26. a memo field in Animals.dbf.
  27.  
  28. BINTREE.PRG
  29. -----------
  30.  
  31. Files used:  Clients.dbf, Clients.dbt
  32.  
  33. This program shows how you can use Bladerunner's object extensions to create
  34. a binary tree.  It builds a tree of clients' names, from clients.dbf, in
  35. alphabetical order.  The tree goes left to right alphabetically, i.e. left
  36. child, parent, right child.
  37.  
  38.  
  39. CONTACT.PRG
  40. -----------
  41.  
  42. Files used:  Company.dbf, Summary.dbf, Summary.mdx, Contact.dbf, Contact.mdx,
  43.              Company.dbt, Company.mdx, Sampproc.prg
  44.  
  45. This program relates 3 tables, and shows how Bladerunner's window controls
  46. work together and change as the record pointer moves in the main table.
  47. It defines a window with a listbox containing the names of companies,
  48. a radiobutton with company types, and an editor showing notes for a company.
  49. You can select the "Browse" pushbutton to browse the whole table of
  50. companies or the "Graph" pushbutton to look at the regression graph of the
  51. currently selected company's figures.  All non-pushbutton controls change as
  52. you move through the listbox to reflect the current state of all related
  53. tables.
  54.  
  55.  
  56. DLLSAMP.PRG
  57. -----------
  58.  
  59. Calls:  MessageBox()   (external function)
  60.  
  61. This program makes an API call to the Windows function MessageBox(), which
  62. brings up a dialog corresponding to the parameters specified in this
  63. function. It shows how easily Bladerunner can interface with external
  64. libraries.
  65.  
  66.  
  67. DUMP.PRG
  68. --------
  69.  
  70. Parameters: O  (name of an object)
  71.  
  72. This program lets you view the name and value of each property
  73. in the parameter object by calling the enum() function.  Enum() creates
  74. a linked list of the object's properties. For instance, you can create a
  75. window, MyWindow, and can view its properties with:
  76.  
  77.      MyWindow = NEW Window()
  78.      DO DUMP WITH MyWindow
  79.  
  80.  
  81. EVENT.PRG
  82. ---------
  83.  
  84. Files used: Sampproc.prg
  85.  
  86. This is a procedure file containing event-driven functions.  If you DO Event,
  87. you can then call MakeButtonWindow() which creates a window with one
  88. pushbutton.  Clicking on different areas in the window will move the button
  89. to that spot, and change the button's caption to show the current
  90. coordinates. Shift-click creates a new button, and Ctrl-click aligns all
  91. buttons.
  92.  
  93. You can also call MakeSizeWindow() which will change its size as you move
  94. the mouse.  Each of these events is made possible by Bladerunner's event
  95. handling functions, which can be assigned to different objects, and executed
  96. as the event happens.  Here, for example, the events are pressing down the
  97. left mouse button, moving the mouse, and changing the size of the window.
  98.  
  99.  
  100. FOCUS2.PRG
  101. ----------
  102.  
  103. Files used: Sampproc.prg
  104.  
  105. This program creates 2 instances of a user-defined window class, and then
  106. changes the properties of each of the windows depending on which one has
  107. focus.  It uses the OnGotFocus and OnLostFocus event handlers to trap
  108. and change the current state of the current window's caption and contents.
  109. This is a simple but powerful example of how Bladerunner's object syntax
  110. handles events.
  111.  
  112. The core of FOCUS2 is just 3 lines of code. These three lines set a 
  113. procedure, and create two window objects. After that, everything is 
  114. handled either automatically, or by the members of the window objects. 
  115.  
  116.  
  117. FONT.PRG
  118. --------
  119.  
  120. Shows how to set different fonts and colors for Bladerunner's window
  121. controls. Currently fonts can be set for text, entryfields, and pushbuttons.
  122.  
  123.  
  124. GRF.PRG
  125. -------
  126.  
  127. Files used:  Sixgraph.dbf, Bar.grf, Pie.grf, Line.grf, Regr.grf, Scat.grf,
  128.              Step.grf
  129.  
  130. Defines a window with 6 different graph objects.  This program shows the
  131. different types of graphs you can use and create using Bladerunner.  Each
  132. graph shows a different view of research data collected in sixgraph.dbf.
  133.  
  134.  
  135. IMAGE.PRG
  136. ---------
  137.  
  138. Files used:  Country.dbf, Country.dbt, Eurpie.grf
  139.  
  140. Brings up a window containing a representation of the GNP of some European
  141. countries.  The GNP is represented in a pie graph object.  The window also
  142. contains an image of a map of Europe with the currently selected country
  143. highlighted.  Selecting a slice of the pie changes the map to the
  144. corresponding country, and shows the name of the country and its capital.
  145.  
  146.  
  147. LINKLIST.PRG
  148. ------------
  149.  
  150. This is a simple program that creates a linked list of integers from 1 to 
  151. 10. Each link has a value and next properties.  After the list is created, 
  152. a function is called to step through it and display the contents of each 
  153. link.
  154.  
  155.  
  156. OPENWIND.PRG
  157. ------------
  158.  
  159. Files used:  Country.dbf, Country.dbt, Sampproc.prg
  160.  
  161. This program shows how Bladerunner's OPEN WINDOW command works.
  162. OPEN WINDOW displays a window and enables the objects it contains, but 
  163. doesn't stop program control flow.
  164.  
  165. In this program, you can select a country in one window, then view 
  166. information about that country in a second window.  You can then select 
  167. more countries from the first window, and bring up windows with information
  168. about them. All information windows will stay on the screen until you 
  169. close them.
  170.  
  171.  
  172.  
  173.  
  174. PICTURES.PRG
  175. ------------
  176.  
  177. Files used:  Pictures.dbf, Pictures.dbt
  178.  
  179. This program shows how Bladerunner's window objects defined on table
  180. fields are related and change as the record pointer changes.  It also
  181. displays Bladerunner's imaging and sound commands.
  182.  
  183. A window is defined with a listbox of image names and the image corresponding
  184. to the currently highlighted name.  There is also a sound button that will
  185. play a sound corresponding to the image.  Both the image and the sound are
  186. stored in memo fields in Pictures.dbf.
  187.  
  188.  
  189.  
  190. PUZZLE.PRG
  191. ----------
  192.  
  193. Calls: Sampproc.prg,
  194.        DeleteObject(),SelectObject(),CreatePen(),GetDC(),ReleaseDC()
  195.        MoveTo(),LineTo(),SetTextColor(),FillRect(),CreateSolidBrush()
  196.        (external functions)
  197.  
  198.  
  199. This program shows how you can use the object syntax to create a simple game.
  200. It also shows how the object extensions and windows API functions can be used
  201. to create a simple painter.
  202.  
  203. A window is displayed with three pushbuttons -- Puzzle, Draw Window,
  204. Paint Window.  The Puzzle pushbutton creates a window with a 15 button
  205. puzzle. The Draw Window pushbutton creates a window that lets you paint rays
  206. in different colors, and the Paint Window creates a window that lets you draw
  207. different colored lines.  You can create as many windows as you like with
  208. each activity. Puzzle.prg is programmed using Bladerunner's object syntax,
  209. and is completely event driven.
  210.  
  211.  
  212.  
  213.  
  214. SHOWPROP.PRG
  215. ------------
  216.  
  217. This is an introduction to Bladerunner's object extensions.  It shows how
  218. most Bladerunner objects can be accessed dynamically using object syntax.
  219. Showprop accesses and changes different properties of the Bladerunner frame
  220. and Command windows, creates sparse arrays using the object syntax, and
  221. shows how you can use the enum() function to view all the properties of
  222. an object.
  223.  
  224.  
  225.  
  226.  
  227. TESTCLAS.PRG
  228. ------------
  229.  
  230. This program shows how to use Bladerunner's object syntax to create
  231. base classes and derived classes.  It defines 2 classes -- MyClass and Base,
  232. and a class Derived, which is derived from the Base class.  It then creates
  233. instances of each of these classes, and displays their properties.
  234.  
  235.  
  236.  
  237. WINAPI.PRG
  238. ----------
  239.  
  240.  
  241. Files used:  Sampproc.prg
  242.  
  243. Calls:  Sampproc.prg,
  244.         GetVersion(),GetWinFlags(),GetModuleUsage(),GetModuleHandle(),
  245.         GetVersion(),ShowWindow(),GetFreeSpace(),SystemParametersInfo(),
  246.         messagebox(),SystemParametersInfo(),CloseWindow(),OpenIcon(),
  247.         GetWindowText(),CloseWindow(),OpenIcon(),GetWindowsDirectory()
  248.         (external functions)
  249.  
  250. This program gives extensive examples of how you can use Bladerunner's API
  251. interface to access Windows' functions and obtain useful information.
  252. It brings up a window that lets you select what external functions/groups
  253. of functions you would like to execute, and then executes your selection.
  254. You can get various system information, bring up Windows dialogs,
  255. minimize/maximize Bladerunner windows, and much more.
  256.  
  257.